<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Futuristic_buttons</title>
    <link rel="stylesheet" href="./index.css">
</head>
<body>
<a href="#">
    <i></i><i></i>
    <span>按钮</span>
</a>

<script>
    let btn = document.querySelector('a');
    btn.addEventListener('mousemove',e=>{
        let rect = e.target.getBoundingClientRect();
        let x = e.clientX * 3 - rect.left;
        btn.style.setProperty('--x',x+'deg')
    })
</script>
</body>
</html>